<!doctype html>



  


<html class="theme-next pisces use-motion">
<head>
  <meta charset="UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" />
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1"/>



<meta http-equiv="Cache-Control" content="no-transform" />
<meta http-equiv="Cache-Control" content="no-siteapp" />












  
  
  <link href="/vendors/fancybox/source/jquery.fancybox.css?v=2.1.5" rel="stylesheet" type="text/css" />




  
  
  
  

  
    
    
  

  

  

  

  

  
    
    
    <link href="//fonts.googleapis.com/css?family=Lato:300,300italic,400,400italic,700,700italic&subset=latin,latin-ext" rel="stylesheet" type="text/css">
  






<link href="/vendors/font-awesome/css/font-awesome.min.css?v=4.4.0" rel="stylesheet" type="text/css" />

<link href="/css/main.css?v=5.0.1" rel="stylesheet" type="text/css" />


  <meta name="keywords" content="Android,Activity," />





  <link rel="alternate" href="/atom.xml" title="GrantonZhuang's Blog" type="application/atom+xml" />




  <link rel="shortcut icon" type="image/x-icon" href="/favicon.ico?v=5.0.1" />






<meta name="description" content="Activity 是 Android 开发里最常见也是最常用，占比重最大的一个点，这篇文章讲述 Activity 的一些学习笔记。">
<meta property="og:type" content="article">
<meta property="og:title" content="Activity 知识点">
<meta property="og:url" content="https://grantonzhuang.github.io/2016/07/08/lifeCycleOfActivity/index.html">
<meta property="og:site_name" content="GrantonZhuang's Blog">
<meta property="og:description" content="Activity 是 Android 开发里最常见也是最常用，占比重最大的一个点，这篇文章讲述 Activity 的一些学习笔记。">
<meta property="og:image" content="http://ww4.sinaimg.cn/mw690/6e8939a6gw1f1n3suwlsrj203x06yaa2.jpg">
<meta property="og:updated_time" content="2016-07-30T12:45:40.983Z">
<meta name="twitter:card" content="summary">
<meta name="twitter:title" content="Activity 知识点">
<meta name="twitter:description" content="Activity 是 Android 开发里最常见也是最常用，占比重最大的一个点，这篇文章讲述 Activity 的一些学习笔记。">
<meta name="twitter:image" content="http://ww4.sinaimg.cn/mw690/6e8939a6gw1f1n3suwlsrj203x06yaa2.jpg">



<script type="text/javascript" id="hexo.configuration">
  var NexT = window.NexT || {};
  var CONFIG = {
    scheme: 'Pisces',
    sidebar: {"position":"left","display":"post"},
    fancybox: true,
    motion: true,
    duoshuo: {
      userId: 0,
      author: '博主'
    }
  };
</script>




  <link rel="canonical" href="https://grantonzhuang.github.io/2016/07/08/lifeCycleOfActivity/"/>

  <title> Activity 知识点 | GrantonZhuang's Blog </title>
</head>

<body itemscope itemtype="http://schema.org/WebPage" lang="zh-Hans">

  










  
  
    
  

  <div class="container one-collumn sidebar-position-left page-post-detail ">
    <div class="headband"></div>

    <header id="header" class="header" itemscope itemtype="http://schema.org/WPHeader">
      <div class="header-inner"><div class="site-meta ">
  

  <div class="custom-logo-site-title">
    <a href="/"  class="brand" rel="start">
      <span class="logo-line-before"><i></i></span>
      <span class="site-title">GrantonZhuang's Blog</span>
      <span class="logo-line-after"><i></i></span>
    </a>
  </div>
  <p class="site-subtitle"></p>
</div>

<div class="site-nav-toggle">
  <button>
    <span class="btn-bar"></span>
    <span class="btn-bar"></span>
    <span class="btn-bar"></span>
  </button>
</div>

<nav class="site-nav">
  

  
    <ul id="menu" class="menu">
      
        
        <li class="menu-item menu-item-home">
          <a href="/" rel="section">
            
              <i class="menu-item-icon fa fa-fw fa-home"></i> <br />
            
            首页
          </a>
        </li>
      
        
        <li class="menu-item menu-item-about">
          <a href="/about/index.html" rel="section">
            
              <i class="menu-item-icon fa fa-fw fa-user"></i> <br />
            
            关于
          </a>
        </li>
      
        
        <li class="menu-item menu-item-archives">
          <a href="/archives/index.html" rel="section">
            
              <i class="menu-item-icon fa fa-fw fa-archive"></i> <br />
            
            归档
          </a>
        </li>
      
        
        <li class="menu-item menu-item-tags">
          <a href="/tags/index.html" rel="section">
            
              <i class="menu-item-icon fa fa-fw fa-tags"></i> <br />
            
            标签
          </a>
        </li>
      

      
    </ul>
  

  
</nav>

 </div>
    </header>

    <main id="main" class="main">
      <div class="main-inner">
        <div class="content-wrap">
          <div id="content" class="content">
            

  <div id="posts" class="posts-expand">
    

  
  

  
  
  

  <article class="post post-type-normal " itemscope itemtype="http://schema.org/Article">

    
      <header class="post-header">

        
        
          <h1 class="post-title" itemprop="name headline">
            
            
              
                Activity 知识点
              
            
          </h1>
        

        <div class="post-meta">
          <span class="post-time">
            <span class="post-meta-item-icon">
              <i class="fa fa-calendar-o"></i>
            </span>
            <span class="post-meta-item-text">发表于</span>
            <time itemprop="dateCreated" datetime="2016-07-08T22:05:50+08:00" content="2016-07-08">
              2016-07-08
            </time>
          </span>

          

          
            
          

          

          
          

          
        </div>
      </header>
    


    <div class="post-body" itemprop="articleBody">

      
      

      
        <p>Activity 是 Android 开发里最常见也是最常用，占比重最大的一个点，这篇文章讲述 Activity 的一些学习笔记。</p>
<a id="more"></a>
<h2 id="生命周期"><a href="#生命周期" class="headerlink" title="生命周期"></a>生命周期</h2><h3 id="正常情况下的生命周期"><a href="#正常情况下的生命周期" class="headerlink" title="正常情况下的生命周期"></a>正常情况下的生命周期</h3><ul>
<li><code>onCreate()</code></li>
</ul>
<p>表示 Activity 正在被创建，这是生命周期的第一个方法，一般在这个方法里做一些初始化的工作。</p>
<ul>
<li><code>onRestart()</code></li>
</ul>
<p>表示 Activity 正在重新启动，从可见状态下变为不可见状态，这个方法会被调用，比如用户按 home 键切换到桌面，再切换回来，这个方法就会被调用。</p>
<ul>
<li><code>onStart()</code></li>
</ul>
<p>回调这个方法的时候，Activity 已经可见，但是还和用户无法交互，这个方法和 onStop() 方法对应</p>
<ul>
<li><code>onResume()</code></li>
</ul>
<p>回调这个方法的时候，Activity 已经可以和用户交互，这个方法和 onPause() 方法对应。</p>
<ul>
<li><code>onPause()</code></li>
</ul>
<p>表示 Activity 正在停止，这个方法调用完毕之后，新的 Activity 的 onResume() 方法才会被调用。</p>
<p>所以不建议在这个方法里做耗时的操作，这个方法和 onResume() 方法对应。</p>
<ul>
<li><code>onStop()</code></li>
</ul>
<p>表示 Activity 即将停止，同样不建议在这个方法里进行耗时的操作，这个方法和 onStart() 方法对应。</p>
<p>但是需要在 onPause() 和 onStop() 中选择的话，选择 onStop 进行操作，这是因为 onStop() 调用的时候，新的 Activity 已经出现在前台并且可以与用户交互了。</p>
<ul>
<li><code>onDestory()</code></li>
</ul>
<p>表示 Activity 即将被销毁，这个方法里可以做一些资源回收和释放的操作，如解除绑定 Service，反注册 BroadCaseReceiver 等。</p>
<h3 id="非正常情况下的生命周期"><a href="#非正常情况下的生命周期" class="headerlink" title="非正常情况下的生命周期"></a>非正常情况下的生命周期</h3><ul>
<li><code>onSaveInstanceState()</code></li>
</ul>
<p>在系统配置发生改变之后，或者内存吃紧，系统回收 Activity 的时候，Activity 会调用这个方法，以保存当前 Activity 的状态。</p>
<p>从这个方法追踪源码到 <code>PhoneWindow#saveHierarchyState()</code> 方法中，可以看到 Activity 的默认实现是保存界面当前的焦点，以及调用了 <code>View#onSaveInstanceState()</code> 方法 来保存界面上所有 View 的状态。</p>
<p>贴一段 <code>PhoneWindow#saveHierarchyState()</code> 的代码</p>
<figure class="highlight java"><table><tr><td class="gutter"><pre><div class="line">1</div><div class="line">2</div><div class="line">3</div><div class="line">4</div><div class="line">5</div><div class="line">6</div><div class="line">7</div><div class="line">8</div><div class="line">9</div><div class="line">10</div><div class="line">11</div><div class="line">12</div><div class="line">13</div><div class="line">14</div><div class="line">15</div><div class="line">16</div><div class="line">17</div><div class="line">18</div><div class="line">19</div><div class="line">20</div><div class="line">21</div><div class="line">22</div><div class="line">23</div><div class="line">24</div><div class="line">25</div><div class="line">26</div><div class="line">27</div><div class="line">28</div><div class="line">29</div><div class="line">30</div><div class="line">31</div><div class="line">32</div></pre></td><td class="code"><pre><div class="line"><span class="function"><span class="keyword">public</span> Bundle <span class="title">saveHierarchyState</span><span class="params">()</span> </span>&#123;</div><div class="line"></div><div class="line">    <span class="comment">// ...</span></div><div class="line">    <span class="comment">// 当前焦点</span></div><div class="line">    View focusedView = mContentParent.findFocus();</div><div class="line">    <span class="keyword">if</span> (focusedView != <span class="keyword">null</span>) &#123;</div><div class="line">        <span class="keyword">if</span> (focusedView.getId() != View.NO_ID) &#123;</div><div class="line">            outState.putInt(FOCUSED_ID_TAG, focusedView.getId());</div><div class="line">        &#125; <span class="keyword">else</span> &#123;</div><div class="line">            <span class="keyword">if</span> (<span class="keyword">false</span>) &#123;</div><div class="line">                Log.d(TAG, <span class="string">"couldn't save which view has focus because the focused view "</span></div><div class="line">                        + focusedView + <span class="string">" has no id."</span>);</div><div class="line">            &#125;</div><div class="line">        &#125;</div><div class="line">    &#125;</div><div class="line"></div><div class="line">    <span class="comment">// view 的状态保存</span></div><div class="line">    SparseArray&lt;Parcelable&gt; panelStates = <span class="keyword">new</span> SparseArray&lt;Parcelable&gt;();</div><div class="line">    savePanelState(panelStates);</div><div class="line">    <span class="keyword">if</span> (panelStates.size() &gt; <span class="number">0</span>) &#123;</div><div class="line">        outState.putSparseParcelableArray(PANELS_TAG, panelStates);</div><div class="line">    &#125;</div><div class="line"></div><div class="line">    <span class="comment">// ActionBar 的状态保存</span></div><div class="line">    <span class="keyword">if</span> (mDecorContentParent != <span class="keyword">null</span>) &#123;</div><div class="line">        SparseArray&lt;Parcelable&gt; actionBarStates = <span class="keyword">new</span> SparseArray&lt;Parcelable&gt;();</div><div class="line">        mDecorContentParent.saveToolbarHierarchyState(actionBarStates);</div><div class="line">        outState.putSparseParcelableArray(ACTION_BAR_TAG, actionBarStates);</div><div class="line">    &#125;</div><div class="line"></div><div class="line">    <span class="keyword">return</span> outState;</div><div class="line">&#125;</div></pre></td></tr></table></figure>
<ul>
<li><code>onCreate(Bundle savedInstanceState)</code></li>
</ul>
<p>Activity 重新创建的时候，也会调用这个方法，正常状态下，<code>savedInstanceState</code> 为空，重新创建的时候，则包含之前保存的数据。</p>
<p>Activity 的默认实现与 <code>onSaveInstanceState()</code> 方法相对应，对之前保存的焦点和调用了 View 的 <code>onRestoreInstanceState()</code> 方法，对 View 的状态进行了恢复。</p>
<p>贴一段<code>PhoneWindow#onRestoreInstanceState</code>的代码</p>
<figure class="highlight java"><table><tr><td class="gutter"><pre><div class="line">1</div><div class="line">2</div><div class="line">3</div><div class="line">4</div><div class="line">5</div><div class="line">6</div><div class="line">7</div><div class="line">8</div><div class="line">9</div><div class="line">10</div><div class="line">11</div><div class="line">12</div><div class="line">13</div><div class="line">14</div><div class="line">15</div><div class="line">16</div><div class="line">17</div><div class="line">18</div><div class="line">19</div><div class="line">20</div><div class="line">21</div><div class="line">22</div><div class="line">23</div><div class="line">24</div><div class="line">25</div><div class="line">26</div><div class="line">27</div><div class="line">28</div><div class="line">29</div><div class="line">30</div><div class="line">31</div><div class="line">32</div><div class="line">33</div></pre></td><td class="code"><pre><div class="line"><span class="function"><span class="keyword">public</span> <span class="keyword">void</span> <span class="title">restoreHierarchyState</span><span class="params">(Bundle savedInstanceState)</span> </span>&#123;</div><div class="line">    <span class="comment">// ...</span></div><div class="line">    <span class="comment">// 恢复当前的焦点</span></div><div class="line">    <span class="keyword">int</span> focusedViewId = savedInstanceState.getInt(FOCUSED_ID_TAG, View.NO_ID);</div><div class="line">    <span class="keyword">if</span> (focusedViewId != View.NO_ID) &#123;</div><div class="line">        View needsFocus = mContentParent.findViewById(focusedViewId);</div><div class="line">        <span class="keyword">if</span> (needsFocus != <span class="keyword">null</span>) &#123;</div><div class="line">            needsFocus.requestFocus();</div><div class="line">        &#125; <span class="keyword">else</span> &#123;</div><div class="line">            Log.w(TAG,</div><div class="line">                    <span class="string">"Previously focused view reported id "</span> + focusedViewId</div><div class="line">                            + <span class="string">" during save, but can't be found during restore."</span>);</div><div class="line">        &#125;</div><div class="line">    &#125;</div><div class="line"></div><div class="line">    <span class="comment">// 恢复 View 的状态</span></div><div class="line">    SparseArray&lt;Parcelable&gt; panelStates = savedInstanceState.getSparseParcelableArray(PANELS_TAG);</div><div class="line">    <span class="keyword">if</span> (panelStates != <span class="keyword">null</span>) &#123;</div><div class="line">        restorePanelState(panelStates);</div><div class="line">    &#125;</div><div class="line">    <span class="comment">// 恢复 ActionBar 的状态</span></div><div class="line">    <span class="keyword">if</span> (mDecorContentParent != <span class="keyword">null</span>) &#123;</div><div class="line">        SparseArray&lt;Parcelable&gt; actionBarStates =</div><div class="line">                savedInstanceState.getSparseParcelableArray(ACTION_BAR_TAG);</div><div class="line">        <span class="keyword">if</span> (actionBarStates != <span class="keyword">null</span>) &#123;</div><div class="line">            doPendingInvalidatePanelMenu();</div><div class="line">            mDecorContentParent.restoreToolbarHierarchyState(actionBarStates);</div><div class="line">        &#125; <span class="keyword">else</span> &#123;</div><div class="line">            Log.w(TAG, <span class="string">"Missing saved instance states for action bar views! "</span> +</div><div class="line">                    <span class="string">"State will not be restored."</span>);</div><div class="line">        &#125;</div><div class="line">    &#125;</div><div class="line">&#125;</div></pre></td></tr></table></figure>
<ul>
<li><code>onRestoreInstanceState()</code></li>
</ul>
<p>在 Activity 重新创建的时候，会回调这个方法，将之前 <code>onSaveInstanceState()</code> 方法保存的数据进行恢复，需要恢复数据，这个方法和 onCreate() 选用一个方法即可。</p>
<p>不同之处是如果 <code>onSaveInstanceState()</code> 方法如果被调用，那么代表 Activity 一定被重新创建了，参数中的 savedInstanceState 一定不为空，而在 onCreate() 则需要做出判断。</p>
<h3 id="引起-Activity-重新创建的系统配置"><a href="#引起-Activity-重新创建的系统配置" class="headerlink" title="引起 Activity 重新创建的系统配置"></a>引起 Activity 重新创建的系统配置</h3><p><code>android.content.res.Configuration</code> 中的许多成员变量，都属于系统配置的 item, 比如屏幕方向，系统语言等。如果不想因为某项内容改变而引起 Activity 重新创建的话，可以在清单文件里指定。</p>
<figure class="highlight xml"><table><tr><td class="gutter"><pre><div class="line">1</div><div class="line">2</div><div class="line">3</div><div class="line">4</div></pre></td><td class="code"><pre><div class="line"><span class="comment">&lt;!-- 不希望 Activity 在屏幕方向改变的时候重新创建 --&gt;</span></div><div class="line"><span class="tag">&lt;<span class="name">activity</span></span></div><div class="line">    <span class="attr">android:name</span>=<span class="string">".MainActivity"</span></div><div class="line">    <span class="attr">android:configChanges</span>=<span class="string">"orientation"</span> /&gt;</div></pre></td></tr></table></figure>
<h2 id="启动模式"><a href="#启动模式" class="headerlink" title="启动模式"></a>启动模式</h2><h3 id="概览"><a href="#概览" class="headerlink" title="概览"></a>概览</h3><table>
<thead>
<tr>
<th>特性</th>
<th>与发出intent的Activity</th>
<th>是否允许多个实例</th>
<th>是否允许存在于多个task中</th>
</tr>
</thead>
<tbody>
<tr>
<td>standard</td>
<td>在同一个task</td>
<td>每次都生成新的实例</td>
<td>允许</td>
</tr>
<tr>
<td>singleTop</td>
<td>在同一个task</td>
<td>如果发出intent的Activity所在的task的顶部存在目标Activity的实例，则直接使用该实例，调用OnNewIntent，否则生成新的实例</td>
<td>允许</td>
</tr>
<tr>
<td>singleTask</td>
<td>如果加入了taskAffinity属性，则新开启一个task，否则在原来的task中</td>
<td>只允许一个实例存在，重复启动会调用onNewIntent方法</td>
<td>只存在于一个task中</td>
</tr>
<tr>
<td>singleInstance</td>
<td>独占一个task</td>
<td>只有一个实例</td>
<td>只存在于一个task中</td>
</tr>
</tbody>
</table>
<h3 id="一些总结的点"><a href="#一些总结的点" class="headerlink" title="一些总结的点"></a>一些总结的点</h3><ul>
<li><p><code>singleTask</code> 只是让系统判定为 <code>可以单task启动</code>，而不是直接开启新的 task 启动，需要加上 <code>taskAffinity</code> 属性，值不同于当前的<code>taskAffinity</code> （一般默认的 <code>taskAffinity</code> 的 value 为包名）</p>
</li>
<li><p><code>taskAffinity</code> 属性设置为相同，可以让不同应用的 Activity 跑在同一个 task 中。</p>
</li>
<li><p>按下多任务键，就能看到 task 的数量。</p>
</li>
<li><p>同一个 task 中，按下返回键起弹栈的作用。</p>
</li>
<li><p>为一个 activity 的 <code>taskAffinity</code> 设置一个空字符串，表明这个 activity <strong>不属于任何 task</strong></p>
</li>
</ul>
<h3 id="示例"><a href="#示例" class="headerlink" title="示例"></a>示例</h3><p>下图是同一个Application中，存在两个task，按下多任务键的情况</p>
<p><img src="http://ww4.sinaimg.cn/mw690/6e8939a6gw1f1n3suwlsrj203x06yaa2.jpg" alt=""></p>

      
    </div>

    <div>
      
        

      
    </div>

    <div>
      
        

      
    </div>

    <footer class="post-footer">
      
        <div class="post-tags">
          
            <a href="/tags/Android/" rel="tag">#Android</a>
          
            <a href="/tags/Activity/" rel="tag">#Activity</a>
          
        </div>
      

      
        <div class="post-nav">
          <div class="post-nav-next post-nav-item">
            
              <a href="/2016/07/01/AndroidIPC学习笔记4/" rel="next" title="Android IPC 学习笔记 4 Binder 连接池">
                <i class="fa fa-chevron-left"></i> Android IPC 学习笔记 4 Binder 连接池
              </a>
            
          </div>

          <div class="post-nav-prev post-nav-item">
            
              <a href="/2016/07/30/IntentFilter/" rel="prev" title="IntentFilter 知识点总结">
                IntentFilter 知识点总结 <i class="fa fa-chevron-right"></i>
              </a>
            
          </div>
        </div>
      

      
      
    </footer>
  </article>



    <div class="post-spread">
      
    </div>
  </div>


          </div>
          


          
  <div class="comments" id="comments">
    
  </div>


        </div>
        
          
  
  <div class="sidebar-toggle">
    <div class="sidebar-toggle-line-wrap">
      <span class="sidebar-toggle-line sidebar-toggle-line-first"></span>
      <span class="sidebar-toggle-line sidebar-toggle-line-middle"></span>
      <span class="sidebar-toggle-line sidebar-toggle-line-last"></span>
    </div>
  </div>

  <aside id="sidebar" class="sidebar">
    <div class="sidebar-inner">

      

      
        <ul class="sidebar-nav motion-element">
          <li class="sidebar-nav-toc sidebar-nav-active" data-target="post-toc-wrap" >
            文章目录
          </li>
          <li class="sidebar-nav-overview" data-target="site-overview">
            站点概览
          </li>
        </ul>
      

      <section class="site-overview sidebar-panel ">
        <div class="site-author motion-element" itemprop="author" itemscope itemtype="http://schema.org/Person">
          <img class="site-author-image" itemprop="image"
               src="http://ww1.sinaimg.cn/mw690/6e8939a6gw1f3g1u1mc6lj20hs0hsmxf.jpg"
               alt="Granton Zhuang" />
          <p class="site-author-name" itemprop="name">Granton Zhuang</p>
          <p class="site-description motion-element" itemprop="description"></p>
        </div>
        <nav class="site-state motion-element">
          <div class="site-state-item site-state-posts">
            <a href="/archives/index.html">
              <span class="site-state-item-count">26</span>
              <span class="site-state-item-name">日志</span>
            </a>
          </div>

          

          
            <div class="site-state-item site-state-tags">
              <a href="/tags/index.html">
                <span class="site-state-item-count">11</span>
                <span class="site-state-item-name">标签</span>
              </a>
            </div>
          

        </nav>

        
          <div class="feed-link motion-element">
            <a href="/atom.xml" rel="alternate">
              <i class="fa fa-rss"></i>
              RSS
            </a>
          </div>
        

        <div class="links-of-author motion-element">
          
        </div>

        
        

        
        

      </section>

      
        <section class="post-toc-wrap motion-element sidebar-panel sidebar-panel-active">
          <div class="post-toc">
            
              
            
            
              <div class="post-toc-content"><ol class="nav"><li class="nav-item nav-level-2"><a class="nav-link" href="#生命周期"><span class="nav-number">1.</span> <span class="nav-text">生命周期</span></a><ol class="nav-child"><li class="nav-item nav-level-3"><a class="nav-link" href="#正常情况下的生命周期"><span class="nav-number">1.1.</span> <span class="nav-text">正常情况下的生命周期</span></a></li><li class="nav-item nav-level-3"><a class="nav-link" href="#非正常情况下的生命周期"><span class="nav-number">1.2.</span> <span class="nav-text">非正常情况下的生命周期</span></a></li><li class="nav-item nav-level-3"><a class="nav-link" href="#引起-Activity-重新创建的系统配置"><span class="nav-number">1.3.</span> <span class="nav-text">引起 Activity 重新创建的系统配置</span></a></li></ol></li><li class="nav-item nav-level-2"><a class="nav-link" href="#启动模式"><span class="nav-number">2.</span> <span class="nav-text">启动模式</span></a><ol class="nav-child"><li class="nav-item nav-level-3"><a class="nav-link" href="#概览"><span class="nav-number">2.1.</span> <span class="nav-text">概览</span></a></li><li class="nav-item nav-level-3"><a class="nav-link" href="#一些总结的点"><span class="nav-number">2.2.</span> <span class="nav-text">一些总结的点</span></a></li><li class="nav-item nav-level-3"><a class="nav-link" href="#示例"><span class="nav-number">2.3.</span> <span class="nav-text">示例</span></a></li></ol></li></ol></div>
            
          </div>
        </section>
      

    </div>
  </aside>


        
      </div>
    </main>

    <footer id="footer" class="footer">
      <div class="footer-inner">
        <div class="copyright" >
  
  &copy; 
  <span itemprop="copyrightYear">2016</span>
  <span class="with-love">
    <i class="fa fa-heart"></i>
  </span>
  <span class="author" itemprop="copyrightHolder">Granton Zhuang</span>
</div>

<div class="powered-by">
  由 <a class="theme-link" href="https://hexo.io">Hexo</a> 强力驱动
</div>

<div class="theme-info">
  主题 -
  <a class="theme-link" href="https://github.com/iissnan/hexo-theme-next">
    NexT.Pisces
  </a>
</div>

        

        
      </div>
    </footer>

    <div class="back-to-top">
      <i class="fa fa-arrow-up"></i>
    </div>
  </div>

  

<script type="text/javascript">
  if (Object.prototype.toString.call(window.Promise) !== '[object Function]') {
    window.Promise = null;
  }
</script>









  



  
  <script type="text/javascript" src="/vendors/jquery/index.js?v=2.1.3"></script>

  
  <script type="text/javascript" src="/vendors/fastclick/lib/fastclick.min.js?v=1.0.6"></script>

  
  <script type="text/javascript" src="/vendors/jquery_lazyload/jquery.lazyload.js?v=1.9.7"></script>

  
  <script type="text/javascript" src="/vendors/velocity/velocity.min.js?v=1.2.1"></script>

  
  <script type="text/javascript" src="/vendors/velocity/velocity.ui.min.js?v=1.2.1"></script>

  
  <script type="text/javascript" src="/vendors/fancybox/source/jquery.fancybox.pack.js?v=2.1.5"></script>


  


  <script type="text/javascript" src="/js/src/utils.js?v=5.0.1"></script>

  <script type="text/javascript" src="/js/src/motion.js?v=5.0.1"></script>



  
  


  <script type="text/javascript" src="/js/src/affix.js?v=5.0.1"></script>

  <script type="text/javascript" src="/js/src/schemes/pisces.js?v=5.0.1"></script>



  
  <script type="text/javascript" src="/js/src/scrollspy.js?v=5.0.1"></script>
<script type="text/javascript" src="/js/src/post-details.js?v=5.0.1"></script>



  


  <script type="text/javascript" src="/js/src/bootstrap.js?v=5.0.1"></script>



  



  




  
  

  

  

  

</body>
</html>
